<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='global-property-'>/**
</span> * @ignore
 * Render aria properties to input element.
 * @author yiminghe@gmail.com
 */
KISSY.add(&quot;combobox/render&quot;, function (S, Control, ComboboxTpl) {

    var ComboboxRender = Control.getDefaultRender().extend({

        beforeCreateDom: function (renderData, childrenElSelectors) {
            S.mix(childrenElSelectors, {
                input: '#ks-combobox-input-{id}',
                trigger: '#ks-combobox-trigger-{id}',
                invalidEl: '#ks-combobox-invalid-el-{id}',
                placeholderEl: '#ks-combobox-placeholder-{id}'
            });
        },

        getKeyEventTarget: function () {
            return this.control.get(&quot;input&quot;);
        },

        _onSetCollapsed: function (v) {
            this.control.get(&quot;input&quot;).attr(&quot;aria-expanded&quot;, !v);
        },

        _onSetDisabled: function (v, e) {
            this.callSuper(v, e);
            this.control.get(&quot;input&quot;).attr(&quot;disabled&quot;, v);
        }

    }, {
        ATTRS: {
            contentTpl: {
                value: ComboboxTpl
            }
        },
        HTML_PARSER: {
            value: function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('input')).val();
            },
            input: function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('input'));
            },
            trigger: function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('trigger'));
            },
            invalidEl: function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('invalid-el'));
            },
            placeholderEl: function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('placeholder'));
            }
        }
    });

    return ComboboxRender;
}, {
    requires: ['component/control', './combobox-xtpl']
});</pre>
</body>
</html>
